from config.database import Base
from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, String

# 短信发送记录

class SmsRecord(Base):
    """
    短信发送记录表
    """
    __tablename__ = 'sms_records'

    id = Column(Integer, primary_key=True, autoincrement=True, comment='主键')
    create_time = Column(DateTime, default=datetime.now(), comment='创建时间')
    content = Column(String(255), nullable=False, comment='内容')
    status = Column(String(1), nullable=False, comment='状态')
    receive_person = Column(String(100), nullable=False, comment='接收人')
    receive_phone = Column(String(100), nullable=False, comment='接收人电话')
    err_reason = Column(String(255), comment='失败原因')
    del_flag = Column(String(1), default='0', comment='删除标志（0代表存在 2代表删除）')
